<div id="edit-title">增加新的供应商</div>
<div>
	<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
		<input type="hidden" name="rand" value="<?php echo $form['rand']; ?>" />
		<div class="edit-name">供应商代码</div>
		<div class="edit-text"><input disabled type="text" value="自动生成" /></div>
		<div class="edit-name">供应商 <?php echo form_error('supplier_name', '<span class="error">', '</span>'); ?></div>
		<div class="edit-text"><input type="text" name="supplier_name" value="<?php echo set_value('supplier_name') ?>" /></div>
		<div class="edit-name">优先级</div>
		<div class="edit-select">
			<select name="supplier_priority">
			<option selected="selected">请选择</option>
			<?php foreach($priority as $p){ ?>
			<option value="<?php echo $p['id'] ?>" <?php echo set_select('supplier_priority', $p['id']); ?>><?php echo $p['name']; ?></option>
			<?php } ?>
			</select>
		</div>
		<div class="edit-name">联系方式 <?php echo form_error('supplier_contact', '<span class="error">', '</span>'); ?></div>
		<div class="edit-text"><input type="text" name="supplier_contact" value="<?php echo set_value('supplier_contact') ?>" /></div>
		<div class="edit-name">联系地址 <?php echo form_error('supplier_location', '<span class="error">', '</span>'); ?></div>
		<div class="edit-text"><input type="text" name="supplier_location" value="<?php echo set_value('supplier_location') ?>" /></div>
		<div class="clear"></div>
		<div class="edit-submit"><input type="submit" value="增加" /></div>
	</form>
</div>
<script type="text/javascript">
$(function(){
	$('.option').bind('click', function(){form.select._click($(this))});
})
</script>